//
//  ViewController.m
//  MKViewController
//
//  Created by Mickey on 2017/1/22.
//  Copyright © 2017年 711. All rights reserved.
//

#import "ViewController.h"
#import "FirstViewController.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"首页" ;
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [ UIColor whiteColor ] ;
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem ];
    [btn setFrame:CGRectMake(100, 100, 100, 30)];
    [btn setTitle:@"点我一下" forState:UIControlStateNormal ];
    [btn addTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside ];
    [self.view addSubview:btn ];
    [self setRightItemWithRights:@[ @"BBBBB", [UIImage imageNamed:@"icon_map_middle_car"]] ];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated ];
    //隐藏线条
    [self setNavgationBarLineHidden:YES ] ;
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated ];
    //显示线条
    [self setNavgationBarLineHidden:NO ];
}

- (IBAction)btnClicked:(id)sender{
    FirstViewController *first = [ FirstViewController new ] ;
    [self.navigationController pushViewController: first animated:YES ];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
